
/**
 * 页面数据缓存工具
 */


const ALL_CATEGORY_KEY = "SILLY_ADMIN_ALL_CATEGORY_KEY";
const CACHE = new Map<any, any>();

export function save(key: any, value: any) {
    CACHE.set(key, value);
}

export function get(key: any) {
    return CACHE.get(key);
}

export function allCategory(){
    return get(ALL_CATEGORY_KEY);
}

export function setAllCategory(value: Array<object>){
    save(ALL_CATEGORY_KEY, value)
}